# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo5.10
# Description:
# Author:       asus
# Date:         2019/2/28
#-------------------------------------------------------------------------------


s = input("请输入一个大字符串：")

while True:
    subString = input("请输入一个子字符串：")
    if subString == "end":
        break
    startStr = input("请输入开始索引：")
    endStr = input("请输入结束索引：")
    strat = 0 #开始索引默认是0
    end = len(s) #结束索引默认是大字符串长度

    if startStr !="":
        start = int(startStr)
    if endStr !="":
        end = int(endStr)
    #利用format方法格式化输出结果
    print("'{}'在'{}'的出现的位置是{}：".format(subString,s,s.find(subString,start,end)))